Dynomotion

Group: DynoMotion Message: 13572 From: Hardy Family Date: 7/14/2016
Subject: Truncating small times in trajectory planner
Hi Tom,

I'm just shooting the last few bugs in my modifications for true 5-axis motion, and I noticed that the function tp_calc_seg_trip_states() in TrajectoryPlanner.cpp will often generate very small time trips (like about 10**-17 sec), usually when I am breaking down a non-linear motion into small steps.  So, mainly to improve readability of traces, but also to reduce USB traffic, I added some code to eliminate those small trip states:

    // time to achieve max vel
    ta = (VM - V0)/A;
   
    // Truncate tiny times (occur from rounding error) - the threshold is the time slice time in the kflop (90us).
    if (ta < 9.0E-5) {
        ta = 0.;
        V0 = VM;
    }

    // dist to achieve max vel
    da = (V0 + 0.5 * A * ta) * ta;

    // time to decel from max vel
    td = (VM - V1)/D;
   
    if (td < 9.0E-5) {
        td = 0.;
    }


    // dist to decel from max vel
    dd = (V1 + 0.5 * D * td) * td;


(my changes highlit).

Do you think this would cause any problems?  Is the 90us threshold reasonable?

Regards,
SJH



Group: DynoMotion Message: 13579 From: Tom Kerekes Date: 7/14/2016
Subject: Re: Truncating small times in trajectory planner

Hi SJH

Its hard to be sure about all the consequences.  But it seems to me they would be insignificant.

1 G x 90us = 0.9mm/sec velocity change

That Velocity error over 90us < 0.1um

Regards
TK



On 7/14/2016 10:47 AM, Hardy Family hardy.woodland.cypress@... [DynoMotion] wrote:
 
Hi Tom,

I'm just shooting the last few bugs in my modifications for true 5-axis motion, and I noticed that the function tp_calc_seg_trip_states() in TrajectoryPlanner.cpp will often generate very small time trips (like about 10**-17 sec), usually when I am breaking down a non-linear motion into small steps.  So, mainly to improve readability of traces, but also to reduce USB traffic, I added some code to eliminate those small trip states:

    // time to achieve max vel
    ta = (VM - V0)/A;
   
    // Truncate tiny times (occur from rounding error) - the threshold is the time slice time in the kflop (90us).
    if (ta < 9.0E-5) {
        ta = 0.;
        V0 = VM;
    }

    // dist to achieve max vel
    da = (V0 + 0.5 * A * ta) * ta;

    // time to decel from max vel
    td = (VM - V1)/D;
   
    if (td < 9.0E-5) {
        td = 0.;
    }


    // dist to decel from max vel
    dd = (V1 + 0.5 * D * td) * td;


(my changes highlit).

Do you think this would cause any problems?  Is the 90us threshold reasonable?

Regards,
SJH